package com.lx.video.web.feign;

import com.lx.bean.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
//import redis.clients.jedis.Jedis;


@Component
public class ProductActionImpl implements ProductAction {

    @Autowired
    RedisTemplate redisTemplate;


    @Override
    public Result getProducts() {
        Result products = (Result) redisTemplate.opsForValue().get("products");
//        System.out.println("服务降级成功");
        return products;
    }

    @Override
    public Result getProductType() {
        Result productType = (Result) redisTemplate.opsForValue().get("productType");
        return productType;
    }
}
